<?php
   header('Content-Type:text/html;charset=utf-8');
   $db=new mysqli('localhost', 'root', '', 'db_bbs', 3306);


  if ($db->connect_errno){

       die("连接失败,出错信息是".$db->connect_error);
   }
   echo "连接成功！";
   
 //  $co=  @mysqli_connect('localhost', 'root', '', 'db_bb2s', 3306) or die("连接失败,出错信息是".  mysqli_connect_error());



   echo "连接成功！";
  
   $db->query("set names utf8");
   $sql="select * from t_message";
   $result=$db->query($sql);
   $num=$result->num_rows();
   